package com.biaobiaoqi.scoreanalysis.service;

import java.util.List;

import com.biaobiaoqi.scoreanalysis.exception.AuthenticateFailedException;
import com.biaobiaoqi.scoreanalysis.exception.DuplicateLoginNameException;
import com.biaobiaoqi.scoreanalysis.exception.NoSuchEntityFoundException;
import com.biaobiaoqi.scoreanalysis.hibernate.bean.Administrator;

public interface IAdministratorService {

	public void addAdministrator(String loginName, String userName,
			String password, String email) throws DuplicateLoginNameException;

	public void deleteAdministrator(int id) throws NoSuchEntityFoundException;

	public void deleteAdministrator(String loginName)
			throws NoSuchEntityFoundException;

	public Administrator authenticateAdministrator(String loginName,
			String password) throws AuthenticateFailedException;

	public List<Administrator> listAllAdministrator();

	public List<Administrator> listAllAdministrator(int from, int number);

	public Administrator getAdministrator(String loginName);

	public Administrator getAdministrator(int id);

	public void modifyAdministratorName(int id, String userName)
			throws NoSuchEntityFoundException;

	public void modifyAdministratorPassword(int id, String originalPassword,
			String newPassword) throws NoSuchEntityFoundException,
			AuthenticateFailedException;

	public boolean isLoginNameAvailable(String loginName);
}
